﻿#region Header
// Copyright 2007-2011, Jerónimo Milea
// 
// This file is part of NetJsWire.
// 
//     NetJsWire is free software: you can redistribute it and/or modify
//     it under the terms of the GNU General Public License as published by
//     the Free Software Foundation, either version 3 of the License, or
//     (at your option) any later version.
// 
//     NetJsWire is distributed in the hope that it will be useful,
//     but WITHOUT ANY WARRANTY; without even the implied warranty of
//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//     GNU General Public License for more details.
// 
//     You should have received a copy of the GNU General Public License
//     along with NetJsWire.  If not, see <http://www.gnu.org/licenses/>.
#endregion

using System.ComponentModel;
using NetJsWire.Widgets.Core;

namespace NetJsWire.Widgets.Config
{
    public partial interface IConfigOptions
    {
        /// <summary>
        ///   Set this to true to ignore datachanged events on the bound store.
        ///   This is useful if you wish to provide custom transition animations via a plugin (defaults to false)
        /// </summary>
        /// <value>false</value>
        [Description( "Set this to true to ignore datachanged events on the bound store." ), DefaultValue( false )]
        bool BlockRefresh { get; set; }

        /// <summary>
        ///   True to defer emptyText being applied until the store's first load.
        /// </summary>
        [Description( "True to defer emptyText being applied until the store's first load." ), DefaultValue( false )]
        bool DeferEmptyText { get; set; }

        /// <summary>
        ///   The text to display in the view when there is no data to display (defaults to '').
        /// </summary>
        [Description( "The text to display in the view when there is no data to display (defaults to '')." ), DefaultValue( ( string ) null )]
        string EmptyText { get; set; }

        /// <summary>
        ///   This is a required setting. A simple CSS selector (e.g. div.some-class or span:first-child) that will be used to determine what nodes this DataView will be working with.
        /// </summary>
        [Description( "This is a required setting. A simple CSS selector (e.g. div.some-class or span:first-child) that will be used to determine what nodes this DataView will be working with." ), DefaultValue( ( string ) null )]
        string ItemSelector { get; set; }

        /// <summary>
        ///   A string to display during data load operations (defaults to undefined).
        ///   If specified, this text will be displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's contents will continue to display normally until the new data is loaded and the contents are replaced.
        /// </summary>
        [Description( "A string to display during data load operations (defaults to undefined)." ), DefaultValue( ( string ) null )]
        string LoadingText { get; set; }

        /// <summary>
        ///   True to allow selection of more than one item at a time, false to allow selection of only a single item at a time or no selection at all, depending on the value of singleSelect (defaults to false).
        /// </summary>
        [Description( "True to allow selection of more than one item at a time, false to allow selection of only a single item at a time or no selection at all, depending on the value of singleSelect (defaults to false)." ), DefaultValue( false )]
        bool MultiSelect { get; set; }

        /// <summary>
        ///   A CSS class to apply to each item in the view on mouseover (defaults to undefined).
        /// </summary>
        [Description( "A CSS class to apply to each item in the view on mouseover (defaults to undefined)." ), DefaultValue( ( string ) null )]
        string OverClass { get; set; }

        /// <summary>
        ///   A CSS class to apply to each selected item in the view (defaults to 'x-view-selected').
        /// </summary>
        [Description( "A CSS class to apply to each selected item in the view (defaults to 'x-view-selected')." ), DefaultValue( ( string ) null )]
        string SelectedClass { get; set; }

        /// <summary>
        ///   True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl, false to force the user to hold Ctrl or Shift to select more than on item (defaults to false).
        /// </summary>
        [Description( "True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl, false to force the user to hold Ctrl or Shift to select more than on item (defaults to false)." ), DefaultValue( false )]
        bool SimpleSelect { get; set; }

        /// <summary>
        ///   True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false).
        /// </summary>
        /// <remarks>
        ///   Note that if multiSelect = true, this value will be ignored.
        /// </remarks>
        [Description( "True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false)." ), DefaultValue( false )]
        bool SingleSelect { get; set; }

        /// <summary>
        ///   The Ext.data.Store to bind this DataView to.
        /// </summary>
        [Description( "The Ext.data.Store to bind this DataView to." ), DefaultValue( null )]
        IDataStore Store { get; set; }

        /// <summary>
        ///   True to enable mouseenter and mouseleave events.
        /// </summary>
        [Description( "True to enable mouseenter and mouseleave events." ), DefaultValue( false )]
        bool TrackOver { get; set; }
    }
}
